a,b,c = list(map(int, input().split()))

if (a==b):
  print(1)
else:
  print(c+1)
